public class Homework_2_MethodArea {
    public static void main(String[] args)throws ClassNotFoundException {
        while (true) {
            ClassLoader loader = new ClassLoader() {
                @Override
                protected Class<?> findClass(String name) throws ClassNotFoundException {
                    byte[] classBytes = ("class DynamicClass {" +
                            "    public DynamicClass() {}" +
                            "}").getBytes();
                    return defineClass(name,classBytes,0,classBytes.length);
                }
            };
            loader.loadClass("DynamicClass");
        }
    }
}